<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新闻预览</title>
    <link rel="stylesheet" href="/css/froala_style.css">
</head>
<body>
<div style="width: 1230px;margin: 0 auto" >
    <input type="hidden" id="newsId" th:value="${newsId}">
    <div id="preview" class="fr-view"></div>
</div>
<script src="/qs.js"></script>
<script src="/axios.min.js"></script>
<script>
    window.onload = ()=>{
     let newsId = document.getElementById("newsId").value
        axios.get("/getAllNews").then(res=>{
           document.getElementById("preview").innerHTML = res.data.filter(f=>f.news_id==newsId)[0].content
        })
    }
</script>
</body>
</html>